<#--
	hasSimpleSearch=true: show SimpleSearchButton
	disableAdd=false: don't show the 'add' button
	disableAll=false: don't show all the buttons , it's used in the child page
-->
<#macro pageinfo_header target url buttonCount hasSimpleSearch=true disableAdd=false disableAll=false>
<div class="pageinfo-header stdEle">
	<#local useTwoLineButton = !disableAll && buttonCount gt 5 && hasSimpleSearch>
	<#if useTwoLineButton>
		<div class="twoLineHeader">
			<div class="simpleSearch"><#nested 2></div>
			<div class="clearBoth"></div>
			<span class="pageinfo-header-button">
				<span style="float: left;padding-right: 4px;"><#if !disableAdd><span class="blue"><@button label="action._add" onclick='_addRecord(this)' url=url/></span></#if></span>
				<span class="dynamicButtonNav"><#nested 1></span>
			</span>
		</div>
	<#else>
		<#if !disableAll>
		<span class="pageinfo-header-button">
			<span style="float: left;padding-right: 4px;"><#if !disableAdd><span class="blue"><@button label="action._add" onclick='_addRecord(this)' url=url/></span></#if></span>
			<span class="dynamicButtonNav"><#nested 1></span>
		</span>
		</#if>
		<#if hasSimpleSearch>
			<div class="simpleSearch"><#nested 2></div>
		</#if>
	</#if>

	<#local _pageInfo = fn.val(action, target)!>
	<#if (_pageInfo?if_exists.class?if_exists.name!'')!='com.googlecode.cswish.model.PageInfo'>
		<#local _pageInfo = fn.newModel('com.googlecode.cswish.model.PageInfo')>
	</#if>
	<span class="pageinfo-pagination"><@pagination pageInfo=_pageInfo onclick="gotoPageInfoPage"/></span>
</div>
</#macro>